
; #CURRENT# ----------------------------------------------
; Analysis
;--------------------------------------------------------- 

; #Function# ---------------------------------------------
; Name...........: Analysis
; Description ...: 
; Parameters ....: 
; Return values .: NA
;---------------------------------------------------------

#cs
;test_S
#include <Func.au3>
$item1_file		= @ScriptDir & "\configuration\source.ini"
$item2_file		= @ScriptDir & "\configuration\destination.ini"
$result_file	= @ScriptDir & "\configuration\D_S_result.ini"
$option_rule	= 0

Analysis($item1_file, $item2_file, $result_file, $option_rule)
MsgBox(0,"","TEST...")

;test_E
#ce

;============$ruleOption
;0:general 
;1:S+D->R
;2:R+E->R'

Func Analysis($item1_file, $item2_file, $result_file, $ruleOption)
	
	_log("Anylysis IN")
	;------
	$var = IniReadSection($item1_file, "Folder")
	If @error Then 
		MsgBox(4096, "", "Error occurred, probably no INI file.")
	Else
		For $i = 1 To $var[0][0]
			MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1])
			$sectionName = IniReadSectionNames($item1_file)		;$var[1] to var[var[0]]
			$var = IniReadSection($item1_file, "Service")
		Next
	EndIf
	;------
	
	For $i = 1 to $sectionName[0] Step +1
		MsgBox(0,"","")
	Next
	;========================
	Switch $ruleOption
		
		Case 0	;//for test
			$t = getKeyValue($item1_file,"File","Item1" ,2)
			IniWrite($result_file,$section,$key,$value)
			IniWrite("C:\Temp\myfile.ini", "section2", "key", "this is a new value")
			MsgBox(0,"$t=",$t)
		Case 1	
		Case 2
	
	EndSwitch
	;========================
EndFunc



